1. Field of the Invention
The present invention relates to a print control method for causing a printing apparatus to print an image in which elements included in a document are arranged on a page.
2. Description of the Related Art
In a process of printing data described in a page description language or a markup language, such as a hypertext markup language (HTML), elements may be arranged over the entire output area by setting an amount of margin to 0. Thus, so-called marginless printing can be performed in which no margin is provided at the edges of a sheet on which an image is printed.
However, even when the amount of margin of a page is set to 0 and elements are arranged on the edges of the page, there is a possibility that edges of the sheet cannot be printed on due to errors in a printing mechanism. In such a case, white streaks remain at the edges of the sheet and satisfactory print results cannot be obtained.
Various methods for avoiding such an unsatisfactory print result have been proposed. For example, Japanese Patent Laid-Open No. 2003-296069 describes a method in which, in a marginless printing process, an expanded image is generated on the basis of image information obtained from an original image and is added to the original image at a peripheral area thereof. In this case, the printing process is performed on the basis of an image that is larger than the original image. Therefore, even if there are errors in the printing mechanism, the possibility that the edges of the sheet cannot be printed on can be eliminated.
However, if the entire area of an output image of a single page is subjected to an expansion process, such as an enlarging process, as in the above-described method of the related art, there is a risk that the following problems will occur in the output result. That is, in the case where, for example, six photographs are arranged as shown in FIG. 15A, the following problems occur. If the entire area of the page shown in FIG. 15A is expanded, an output image shown in FIG. 15B is obtained. However, when the thus-obtained output image is printed, the areas of the photographs printed on the page differ from each other.
In, for example, an XHTML-Print document, elements are not always arranged on the edges of the output area even when the amount of margin of the page is set to 0. In such a case, no white streak appears at the edges of the sheet even when the printing process is performed without expanding the output image. Therefore, the output image will be unnecessarily expanded.
Japanese Patent Laid-Open No. 2006-272803 describes a method in which an expanding method is applied in consideration of objects placed in a peripheral area instead of expanding the entire area of the image for which the marginless printing process is performed. More specifically, if clear objects are placed in the peripheral area, the image is expanded by enlarging the image to prevent deformation of the shapes of the objects. If there are no clear objects in the peripheral area or if the objects in the peripheral area are unclear, the image is expanded by generating new image data in an area outside the image on the basis of the image data of the peripheral area.
However, only the objects placed in the peripheral area are taken into consideration in the process of detecting the objects and expanding the image. Therefore, there is a risk that an unnatural image will be printed if the entire area of the expanded image is printed.